import httpInstance from "@/utils/http";

// 获取轮播图
export const getBannerAPI = function ({ distributionSite = '1' } = {}) {
    return httpInstance({
        url: '/home/banner',
        method: 'GET',
        params: {
            // Home页面为1，分类页面为2
            distributionSite,
        },
    });
};

// 获取新鲜好物
export const getNewAPI = function () {
    return httpInstance({
        url: '/home/new',
        method: 'GET',
    });
};

// 获取人气推荐
export const getHotAPI = function () {
    return httpInstance({
        url: '/home/hot',
        method: 'GET',
    });
};

// 获取商品模块
export const getGoodsAPI = function () {
    return httpInstance({
        url: '/home/goods',
        method: 'GET',
    });
};